package chapter_19_mediator.classic;

/**
 * @author yaochenglong
 * @date 2017/10/23
 * 具体中介者
 */
public class ConcreteMediator extends AbstractMediator {

    @Override
    public void doSomething1() {
        //调用同事类的方法，只要是public的方法都能调用
        concreteColleague1.selfMethod1();
        concreteColleague2.selfMethod1();
    }

    @Override
    public void doSomething2() {
        concreteColleague1.selfMethod2();
        concreteColleague2.selfMethod2();
    }
}
